package com.chen.staffjoy.company.entity;

import lombok.*;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * 团队任务排班记录表
 *
 * @author ChenTian
 */ 
@NoArgsConstructor
@AllArgsConstructor
@Data
@Builder
@ToString
@DynamicInsert
@DynamicUpdate
@Entity
@Table(name = "shift")
public class Shift implements Serializable {

	/**
	 * 
	 */ 
	@Id
	@GeneratedValue(generator = "jpa-uuid")
	@Column(name = "id")
	private String id;

	/**
	 * 班次对应的团队
	 */ 
	@Column(name = "team_id")
	private String teamId;

	/**
	 * 班次对应的任务
	 */ 
	@Column(name = "job_id")
	private String jobId;

	/**
	 * 指派的雇员
	 */ 
	@Column(name = "user_id")
	private String userId;

	/**
	 * 是否已经发布
	 */ 
	@Column(name = "published")
	private Byte published;

	/**
	 * 开始时间
	 */ 
	@Column(name = "start")
	private Date start;

	/**
	 * 结束时间
	 */ 
	@Column(name = "stop")
	private Date stop;

}

